Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix edition 2024 compile errors #998

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

xxchan
Copy link
Member

@xxchan xxchan commented Feb 23, 2025

No description provided.

Comment on lines -143 to +144
ref target_schema,
ref operations,
target_schema,
operations,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xxchan xxchan force-pushed the xxchan/standard-xerinae branch from 97411cc to 2db0fc0 Compare February 23, 2025 14:07
) -> Result<Box<impl Iterator<Item = Result<ManifestFileContext>>>> {
) -> Result<Box<impl Iterator<Item = Result<ManifestFileContext>> + 'static>> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://doc.rust-lang.org/nightly/edition-guide/rust-2024/rpit-lifetime-capture.html#edition-specific-rules-when-no-use-bound-is-present

In edition 2024, the RPIT will capture 'self

And causing error at spawn:

error[E0521]: borrowed data escapes outside of method
   --> crates/iceberg/src/scan.rs:402:9
    |
365 |       pub async fn plan_files(&self) -> Result<FileScanTaskStream> {
    |                               -----
    |                               |
    |                               `self` is a reference that is only valid in the method body
    |                               let's call the lifetime of this reference `'1`
...
402 | /         spawn(async move {
403 | |             let result = futures::stream::iter(manifest_file_contexts)
404 | |                 .try_for_each_concurrent(concurrency_limit_manifest_files, |ctx| async move {
405 | |                     ctx.fetch_manifest_and_stream_manifest_entries().await
...   |
412 | |         });
    | |          ^
    | |          |
    | |__________`self` escapes the method body here
    |            argument requires that `'1` must outlive `'static`

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @xxchan for the fix.

@Xuanwo Xuanwo merged commit 8fd343d into apache:main Feb 24, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants